package week8;

public class Transport {
    private int speed;
    private String name;
    public Transport(String name,int speed){
        this.name=name;
        this.speed=speed;
    }

    public Transport(){

    }
    public void Moveway(){
        System.out.println("交通工具是"+name);
    }
    public void showInfo() {
        System.out.println(name + "的速度为" + speed);

    }

    public int getSpeed() {
        return speed;
    }

    public String getName() {
        return name;
    }
}
